package com.fengye.demo.helper;

import com.fengye.demo.config.LoginUser;

/**
 * @author haiqing.gao
 * @date 2024-01-22 15:59
 */
public class LoginHelper {

    private static final ThreadLocal<LoginUser> loginUserHolder = new ThreadLocal<>();

    public static LoginUser getLoginUser() {
        return loginUserHolder.get();
    }

    public static void setLoginUser(LoginUser loginUser) {
        loginUserHolder.set(loginUser);
    }

    public static void clearLoginUser() {
        loginUserHolder.remove();
    }

    public static boolean isTenantAdmin() {
        return false;
    }

    public static boolean isSuperAdmin() {
        return false;
    }
}
